package com.coffee.app.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.coffee.app.common.dto.AppUserQueryDTO;
import com.coffee.app.common.vo.AppUserListVO;
import com.coffee.app.service.IAppUserService;
import com.coffee.framework.log.annotation.AutoLog;
import com.coffee.framework.common.result.R;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author Kevin
 * @since 2022-05-03
 */
@RestController
@RequestMapping("/app/appUser")
@AllArgsConstructor
public class AppUserController {

    private IAppUserService appUserService;

    /**
     * 分页查询
     */
    @GetMapping("/page")
    @SaCheckPermission("app:appUser:page")
    @AutoLog(module = "用户表", title = "分页查询")
    public R<Page<AppUserListVO>> page(Page reqPage, AppUserQueryDTO req) {
        return R.success(appUserService.page(reqPage, req));
    }

}

